<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:fbi="http://www.fbifaces.org"
                template="/templates/ui.xhtml">

    <ui:define name="head">
    </ui:define>
    <ui:define name="content">
        <div style="margin:5px">
            <p:tabView dynamic="true" cache="false" style="font-weight:normal;font-style:normal">
                <p:tab title="科目余额对照">
                    <div id="qrytable">
                        <h:form id="form">
                            <p:growl id="msgs" showDetail="false"/>
                            <p:menubar style="margin-top:20px">
                                <p:menuitem type="push" value="生成科目余额校验数据" icon="ui-icon ui-icon-gear"
                                            action="#{subjectVerifyAction.onGenerateRecord}" update="msgs, pdt"/>
                                <p:menuitem type="push" value="导出Excel" icon="ui-icon ui-icon-gear"
                                            ajax="false">
                                    <fbi:DataExporter titleName="按科目余额校验表" target="pdt" type="xls"
                                                      fileName="subjectVerify"
                                                      excludeColumnsWidth="20,10,14,26,16,16,16,20"/>
                                </p:menuitem>
                            </p:menubar>
                            <p:ajaxStatus style="height:18px;text-align:center">
                                <f:facet name="start">
                                    <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                                </f:facet>
                                <f:facet name="complete">
                                    <h:outputText value=""/>
                                </f:facet>
                            </p:ajaxStatus>
                            <p:dataTable id="pdt" dynamic="true" style="width:100%;"
                                         value="#{subjectVerifyAction.detlList}" var="record"
                                         rowKey="#{record.sn}"
                                         selection="#{subjectVerifyAction.selectedRecords}"
                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                         paginator="true" rows="15" paginatorPosition="bottom"
                                         rowsPerPageTemplate="100,50,30,15,5"
                                         emptyMessage="数据记录为空...">
                                <p:column selectionMode="multiple"/>

                                <p:column style="text-align:center" filterBy="#{record.dcc_subject_code}" filterMatchMode="contains" >
                                    <f:facet name="header">
                                        <h:outputText value="人行指标代号"/>
                                    </f:facet>
                                    <h:outputText value="#{record.dcc_subject_code}"/>
                                </p:column>
                                <p:column  style="text-align: center" filterBy="#{record.acct_code}" filterMatchMode="contains">
                                    <f:facet name="header">
                                        <h:outputText value="核算码" />
                                    </f:facet>
                                    <h:outputText value="#{record.acct_code}"/>
                                </p:column>
                            </p:dataTable>
                        </h:form>
                    </div>
                </p:tab>
            </p:tabView>
        </div>
    </ui:define>
</ui:composition>